package day12.problem1;

import java.util.Scanner;

//删除公共字符串
//https://www.nowcoder.com/practice/f0db4c36573d459cae44ac90b90c6212?tpId=182&tqId=34789&ru=/exam/oj

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] hash = new int[128];
        String s1 = in.nextLine();
        String s2 = in.nextLine();
        for(char ch : s2.toCharArray()) {
            hash[ch]++;
        }

        StringBuffer ret = new StringBuffer();
        for(char ch : s1.toCharArray()) {
            if(hash[ch] == 0) {
                ret.append(ch);
            }
        }
        System.out.println(ret);
    }
}